<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>tango.io.digest.Tiger</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "tango.io.digest.Tiger";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/tango.io.digest.Tiger.html" class="symbol">tango.io.digest.Tiger</a></h1>
  
<p class="sec_header">License:</p>BSD style: see doc/license.txt for details
<p class="sec_header">Version:</p>Initial release: Feb 2006
<p class="sec_header">Author:</p>Regan Heath, Oskar Linde
<p class="bl"/>
        This module implements the Tiger algorithm by Ross Anderson and Eli
        Biham.
<dl>
<dt class="decl">class <a class="symbol _class" name="Tiger" href="./htmlsrc/tango.io.digest.Tiger.html#L28" kind="class" beg="28" end="319">Tiger</a> : MerkleDamgard; <span class="attrs">[<span class="stc">final</span>]</span> <a title="Permalink to this symbol" href="#Tiger" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.digest.Tiger.html#L28">#</a></dt>
<dd class="ddef">
<div class="summary"></div>
<dl>
<dt class="decl">ulong[3] <a class="symbol _variable" name="Tiger.initial" href="./htmlsrc/tango.io.digest.Tiger.html#L38" kind="variable" beg="38" end="43">initial</a>; <span class="attrs">[<span class="prot">private</span>, <span class="stc">static</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#Tiger.initial" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.digest.Tiger.html#L38">#</a></dt>
<dd class="ddef">
<div class="summary"></div></dd>
<dt class="decl"><a class="symbol _ctor" name="Tiger.this" href="./htmlsrc/tango.io.digest.Tiger.html#L51" kind="ctor" beg="51" end="51">this</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#Tiger.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.digest.Tiger.html#L51">#</a></dt>
<dd class="ddef">
<div class="summary">Construct an Tiger</div></dd>
<dt class="decl">uint <a class="symbol _function" name="Tiger.digestSize" href="./htmlsrc/tango.io.digest.Tiger.html#L59" kind="function" beg="59" end="59">digestSize</a><span class="params">()</span>; <span class="attrs">[<span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#Tiger.digestSize" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.digest.Tiger.html#L59">#</a></dt>
<dd class="ddef">
<div class="summary">The size of a tiger digest is 24 bytes</div></dd>
<dt class="decl">void <a class="symbol _function" name="Tiger.reset" href="./htmlsrc/tango.io.digest.Tiger.html#L71" kind="function" beg="71" end="75">reset</a><span class="params">()</span>; <span class="attrs">[<span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#Tiger.reset" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.digest.Tiger.html#L71">#</a></dt>
<dd class="ddef">
<div class="summary">Initialize the cipher</div>
<p class="sec_header">Remarks:</p>Returns the cipher state to it's initial value</dd>
<dt class="decl">void <a class="symbol _function" name="Tiger.createDigest" href="./htmlsrc/tango.io.digest.Tiger.html#L90" kind="function" beg="90" end="95">createDigest</a><span class="params">(ubyte[] <em>buf</em>)</span>; <span class="attrs">[<span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#Tiger.createDigest" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.digest.Tiger.html#L90">#</a></dt>
<dd class="ddef">
<div class="summary">Obtain the digest</div>
<p class="sec_header">Returns:</p>the digest
<p class="sec_header">Remarks:</p>Returns a digest of the current cipher state, this may be the
                final digest, or a digest of the state between calls to update()</dd>
<dt class="decl">uint <a class="symbol _function" name="Tiger.passes" href="./htmlsrc/tango.io.digest.Tiger.html#L112" kind="function" beg="112" end="115">passes</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#Tiger.passes" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.digest.Tiger.html#L112">#</a></dt>
<dd class="ddef">
<div class="summary">Get the number of passes being performed</div>
<p class="sec_header">Returns:</p>the number of passes
<p class="sec_header">Remarks:</p>The Tiger algorithm may perform an arbitrary number of passes
                the minimum recommended number is 3 and this number should be
                quite secure however the "ultra-cautious" may wish to increase
                this number.</dd>
<dt class="decl">void <a class="symbol _function" name="Tiger.passes:2" href="./htmlsrc/tango.io.digest.Tiger.html#L132" kind="function" beg="132" end="136">passes</a><span class="params">(uint <em>n</em>)</span>; <a title="Permalink to this symbol" href="#Tiger.passes:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.digest.Tiger.html#L132">#</a></dt>
<dd class="ddef">
<div class="summary">Set the number of passes to be performed</div>
<p class="sec_header">Params:</p>
<table class="params">
<tr><td><em>n</em></td><td>the number of passes to perform</td></tr></table>
<p class="sec_header">Remarks:</p>The Tiger algorithm may perform an arbitrary number of passes
                the minimum recommended number is 3 and this number should be
                quite secure however the "ultra-cautious" may wish to increase
                this number.</dd>
<dt class="decl">uint <a class="symbol _function" name="Tiger.blockSize" href="./htmlsrc/tango.io.digest.Tiger.html#L151" kind="function" beg="151" end="151">blockSize</a><span class="params">()</span>; <span class="attrs">[<span class="prot">protected</span>, <span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#Tiger.blockSize" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.digest.Tiger.html#L151">#</a></dt>
<dd class="ddef">
<div class="summary">block size</div>
<p class="sec_header">Returns:</p>the block size
<p class="sec_header">Remarks:</p>Specifies the size (in bytes) of the block of data to pass to
                each call to transform(). For Tiger the blockSize is 64.</dd>
<dt class="decl">uint <a class="symbol _function" name="Tiger.addSize" href="./htmlsrc/tango.io.digest.Tiger.html#L167" kind="function" beg="167" end="167">addSize</a><span class="params">()</span>; <span class="attrs">[<span class="prot">protected</span>]</span> <a title="Permalink to this symbol" href="#Tiger.addSize" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.digest.Tiger.html#L167">#</a></dt>
<dd class="ddef">
<div class="summary">Length padding size</div>
<p class="sec_header">Returns:</p>the length padding size
<p class="sec_header">Remarks:</p>Specifies the size (in bytes) of the padding which uses the
                length of the data which has been ciphered, this padding is
                carried out by the padLength method. For Tiger the addSize is 8.</dd>
<dt class="decl">void <a class="symbol _function" name="Tiger.padMessage" href="./htmlsrc/tango.io.digest.Tiger.html#L183" kind="function" beg="183" end="187">padMessage</a><span class="params">(ubyte[] <em>at</em>)</span>; <span class="attrs">[<span class="prot">protected</span>, <span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#Tiger.padMessage" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.digest.Tiger.html#L183">#</a></dt>
<dd class="ddef">
<div class="summary">Pads the cipher data</div>
<p class="sec_header">Params:</p>
<table class="params">
<tr><td><em>data</em></td><td>a slice of the cipher buffer to fill with padding</td></tr></table>
<p class="sec_header">Remarks:</p>Fills the passed buffer slice with the appropriate padding for
                the final call to transform(). This padding will fill the cipher
                buffer up to blockSize()-addSize().</dd>
<dt class="decl">void <a class="symbol _function" name="Tiger.padLength" href="./htmlsrc/tango.io.digest.Tiger.html#L204" kind="function" beg="204" end="208">padLength</a><span class="params">(ubyte[] <em>at</em>, ulong <em>length</em>)</span>; <span class="attrs">[<span class="prot">protected</span>, <span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#Tiger.padLength" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.digest.Tiger.html#L204">#</a></dt>
<dd class="ddef">
<div class="summary">Performs the length padding</div>
<p class="sec_header">Params:</p>
<table class="params">
<tr><td><em>data</em></td><td>the slice of the cipher buffer to fill with padding</td></tr>
<tr><td><em>length</em></td><td>the length of the data which has been ciphered</td></tr></table>
<p class="sec_header">Remarks:</p>Fills the passed buffer slice with addSize() bytes of padding
                based on the length in bytes of the input data which has been
                ciphered.</dd>
<dt class="decl">void <a class="symbol _function" name="Tiger.transform" href="./htmlsrc/tango.io.digest.Tiger.html#L225" kind="function" beg="225" end="248">transform</a><span class="params">(ubyte[] <em>input</em>)</span>; <span class="attrs">[<span class="prot">protected</span>, <span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#Tiger.transform" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.digest.Tiger.html#L225">#</a></dt>
<dd class="ddef">
<div class="summary">Performs the cipher on a block of data</div>
<p class="sec_header">Params:</p>
<table class="params">
<tr><td><em>data</em></td><td>the block of data to cipher</td></tr></table>
<p class="sec_header">Remarks:</p>The actual cipher algorithm is carried out by this method on
                the passed block of data. This method is called for every
                blockSize() bytes of input data and once more with the remaining
                data padded to blockSize().</dd>
<dt class="decl">ubyte <a class="symbol _function" name="Tiger.getByte" href="./htmlsrc/tango.io.digest.Tiger.html#L254" kind="function" beg="254" end="257">getByte</a><span class="params">(ulong <em>c</em>, uint <em>b1</em>, uint <em>b2</em> = 0)</span>; <span class="attrs">[<span class="prot">private</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#Tiger.getByte" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.digest.Tiger.html#L254">#</a></dt>
<dd class="ddef">
<div class="summary"></div></dd>
<dt class="decl">void <a class="symbol _function" name="Tiger.round" href="./htmlsrc/tango.io.digest.Tiger.html#L263" kind="function" beg="263" end="269">round</a><span class="params">(inout ulong <em>a</em>, inout ulong <em>b</em>, inout ulong <em>c</em>, ulong <em>x</em>, ulong <em>mul</em>)</span>; <span class="attrs">[<span class="prot">private</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#Tiger.round" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.digest.Tiger.html#L263">#</a></dt>
<dd class="ddef">
<div class="summary"></div></dd>
<dt class="decl">void <a class="symbol _function" name="Tiger.pass" href="./htmlsrc/tango.io.digest.Tiger.html#L275" kind="function" beg="275" end="285">pass</a><span class="params">(inout ulong <em>a</em>, inout ulong <em>b</em>, inout ulong <em>c</em>, ulong[8] <em>x</em>, ulong <em>mul</em>)</span>; <span class="attrs">[<span class="prot">private</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#Tiger.pass" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.digest.Tiger.html#L275">#</a></dt>
<dd class="ddef">
<div class="summary"></div></dd>
<dt class="decl">void <a class="symbol _function" name="Tiger.keySchedule" href="./htmlsrc/tango.io.digest.Tiger.html#L291" kind="function" beg="291" end="309">keySchedule</a><span class="params">(ulong[8] <em>x</em>)</span>; <span class="attrs">[<span class="prot">private</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#Tiger.keySchedule" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.digest.Tiger.html#L291">#</a></dt>
<dd class="ddef">
<div class="summary"></div></dd>
<dt class="decl">ulong[] <a class="symbol _function" name="Tiger.t1" href="./htmlsrc/tango.io.digest.Tiger.html#L315" kind="function" beg="315" end="315">t1</a><span class="params">()</span>; <span class="attrs">[<span class="prot">private</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#Tiger.t1" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.digest.Tiger.html#L315">#</a></dt>
<dd class="ddef">
<div class="summary"></div></dd></dl></dd>
<dt class="decl">ulong[1024] <a class="symbol _variable" name="table" href="./htmlsrc/tango.io.digest.Tiger.html#L326" kind="variable" beg="326" end="840">table</a>; <span class="attrs">[<span class="prot">private</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#table" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.digest.Tiger.html#L326">#</a></dt>
<dd class="ddef">
<div class="summary"></div></dd></dl>
</div>
<div id="footer">
  <p>Copyright (c) 2006 Tango. All rights reserved</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Fri Dec 26 04:04:03 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>